{use master_page('front/v_page_master')}

{block left}
<center>
<div class="content" style="width:1000px; margin-left:auto; margin-right:auto">
   <div class="main">
  <div class="banner2"><img src="images/banner2.jpg" width="1000" height="100"></div>
   <div class="bar"><b><a href="<?=_U("")?>"></a>
			留言板</b>
	   <span><font >当前位置 :</font> 
	  	  <a href="<?=_U("")?>" >首页&nbsp;&nbsp;></a>
			留言板
	   </span>
	</div>
   <div class="left">
     <div class="at3">
        <div class="at3_c">
        <h2><a href="<?=_U("")?>"></a>
			</h2>
        <p>
        <?
		//$where = $this->Request();
		$page_size = 20;
		$where['page'] = !isset($_GET['page'])?1:$this->input->get('page');
		$where['page_size'] = $page_size;
		$where['is_agreed'] = 1;
		$guest_books = $this->guest_book_manager->get_list($where);
		$record_count = $this->guest_book_manager->query_result->record_count;
		
		?>   
			<?php if(isset($success)):?>
			<h2 style="color:red"> 留言成功</h2>
			<?php endif;?>
			<h2 class="title6">通过给巨人留言，最快满足您的需求</h2>
			<p>为了方便与您联系，请务必填写正确的手机号码与邮箱地址，感谢您的支持</p>
			<div class="liuy">
				<div> 
					<form class="formtable" action="<?=_U("guest_book/show")?>" method="post">
						<table class="gb_list1">
							<tr><td width="15%">
							<?=lang('guest_book_title')?>:</td><td><input value='<?=set_value('p_title')?>' class="text1" type="text" name="p_title"></input>
							<?=form_error('p_title', '<font color="red">', '</font>')?> 
							</td></tr>
							<tr><td>
							<?=lang('guest_book_contacter')?>:</td><td><input  value='<?=set_value('p_contacter')?>' class="text1" type="text" name="p_contacter"></input>
							<?=form_error('p_contacter', '<font color="red">', '</font>')?> 
							</td></tr>
							<tr><td>
							<?=lang('guest_book_contacter_phone')?>:</td><td><input value='<?=set_value('p_contacter_phone')?>' class="text1" type="text" name="p_contacter_phone"></input>
							<?=form_error('p_contacter_phone', '<font color="red">', '</font>')?> 
							</td></tr>
							<tr><td>
							<?=lang('guest_book_contacter_mobilephone')?>:</td><td><input value='<?=set_value('p_contacter_mobilephone')?>' class="text1" type="text" name="p_contacter_mobilephone"></input>
							<?=form_error('p_contacter_mobilephone', '<font color="red">', '</font>')?> 
							</td></tr>
							<tr><td>
							<?=lang('guest_book_contacter_email')?>:</td><td><input value='<?=set_value('p_contacter_email')?>' class="text1" type="text" name="p_contacter_email"></input>
							<?=form_error('p_contacter_email', '<font color="red">', '</font>')?> 
							</td></tr>
							<tr><td>
							<?=lang('guest_book_content')?>:</td><td><textarea value='<?=set_value('p_content')?>' cols="60" rows="6" name="p_content"></textarea><br>
							<?=form_error('p_content', '<font color="red">', '</font>')?>
							<input  type="submit" class="btn1" value="" ></input>
							</td></tr>
						</table> 
					</form>
				</div>
				<div>
	
					<h2 class="title7">历史留言</h2>
					<?foreach($guest_books as $guest_book):?>
					<div class="list1">
             		  <div class="list1_l"><img src="images/icon10.jpg" width="23" height="26"></div>
              			 <div class="list1_r">
              			  <h3>咨询标题：<?=$guest_book->title?></h3>
		                  <h3>咨询内容：<span class="time"><?=$guest_book->create_time?></span></h3>
		                  <p><?=$guest_book->content?></p>
		                  <h3>咨询人：<?=$guest_book->contacter?></h3>
		               	</div>
		               	<div class="clear"></div>
		            </div>
		            <!-- div class="list1">
		              <div class="list1_l"><img src="images/icon11.jpg" width="23" height="26"></div>
		                <div class="list1_r1">
		               	<div class="jiantou2"></div>
		                  <h3>巨人回复：<span class="time"></span></h3>
		                  <p></p>
		              	</div>
		               <div class="clear"></div>
		            </div -->
		            <div class="line_liuyan"></div>
					<?endforeach;?>
				</div>
			</div>
        </div>
        <div class="clear"></div>
     </div>
     <form class="listform"  action="<?=_U("guest_book/show")?>" method="get">
     <?$this->load->view('front/v_pager_form',array('record_count'=>$record_count,'page_size'=>$page_size))?>
     </form>
   </div>
   <div class="right">
      <div class="box5">
         <div class="prot1">
            <div class="port2">
            	<div class="title_bg">
					<div class="img2">
						<img src="images/icon8.jpg" width="32" height="32">
					</div>
					<div class="title10">联系我们</div>
					<div style="clear:both"></div>
				</div>
				<div class="block" style="width:210px;margin-top:10px">
					<div class="profile">
						<div class="profile_right" >
							<div class="title_bg"><div class="right_round_rectangle">
							</div></div>
							<div style="margin:12px 0px;text-align:left">
								<div style="MARGIN-TOP: 15px; PADDING-BOTTOM: 0px; MARGIN-LEFT: 25px; COLOR: #333; LINE-HEIGHT: 200%">
								地&nbsp;&nbsp; 址：{site_info->address}<br>
								电&nbsp;&nbsp; 话：{site_info->phone}<br>
								手&nbsp;&nbsp; 机：{site_info->mobile_phone}<br>
								网&nbsp;&nbsp; 址：{site_info->url}
								</div>
								<div style="clear:both"></div>
							</div>
						</div>
					</div>
					<div class="bott_left_round_rectangle">&nbsp;</div>
					<div class="bott_right_round_rectangle">&nbsp;</div>
				</div>                 
            </div>
         </div>
      </div>
   </div>
   <div class="clear"></div> 
  </div>
</div>
</center>
{end}



